//package cn.hloger.spider.demo.kafkaDemo.consumer;
//
//import lombok.extern.slf4j.Slf4j;
//import org.apache.kafka.clients.consumer.ConsumerRecord;
//import org.springframework.kafka.annotation.KafkaListener;
//import org.springframework.kafka.support.Acknowledgment;
//import org.springframework.stereotype.Component;
//
///**
// * 数据权限审批流消费者
// */
//@Slf4j
//@Component
//public class KafkaConsumer {
//
//    @KafkaListener(groupId = "localConsumerTest", topics = {"zhy_h_test_topic"})
//    public void consumer(ConsumerRecord<String, String> record, Acknowledgment ack) {
//        log.info("接收到数据权限流程引擎的Kafka消息: {} ", record);
//        String message = record.value();
//        try {
////            这里开始消费
//            System.out.println(message);
//            if (true) {
//                //这是消费成功了执行
//                ack.acknowledge();
//                log.info("接收到流程引擎的Kafka消息,已经完成数据更新,消费的消息体为：{}", record.value());
//            }
//        } catch (Exception e) {
//            log.error("处理流程引擎的Kafka消息发生异常: {}", e.getMessage());
//            throw new RuntimeException(e);
//        }
//
//    }
//
//}
